﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PayReporting.aspx.cs" Inherits="FinanceCenter_PayReporting" %>

<%@ Register Assembly="Shove.Web.UI.2 For.NET 2.0" Namespace="Shove.Web.UI" TagPrefix="ShoveWebUI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title>工资管理系统 - 会员中心</title>
    <link href="../Style/css.css" rel="stylesheet" type="text/css" />
    <link href="../Style/main.css" rel="stylesheet" type="text/css" />

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script language="javascript" type="text/jscript">
	    function CheckAll(form)
        {
            for (var i=0;i<form.elements.length;i++)
            {
                var e = form.elements[i];
                if (e.type == "checkbox")
                e.checked = form.chkAll.checked;
            }
        }
        function checkAddSMS(form)
        {
            var bln = false;
            for(i=0; i<form.elements.length; i++)
            {
                var e = form.elements[i];
                if (e.type == "checkbox" && e.checked && e.name != "chkAll")
                {
                    bln = true;
                    break;
                }
             }
             
            if (bln)
            {
                if (confirm('确定要将选定的客户加入到短信营销吗?'))
                {
                    return true;
                }
                else
                {
                    for (var i=0;i<form.elements.length;i++)
                    {
                        var e = form.elements[i];
                        if (e.type == "checkbox")
                        e.checked = false;
                    }

                    return false;
                }
            }
            else
            {
                alert('请选择您要操作的客户');
                for (var i=0;i<form.elements.length;i++)
                {
                    var e = form.elements[i];
                    if (e.type == "checkbox")
                    e.checked = false;
                }

                return;
            }
        }
        
        function checkAddEMail(form)
        {
            var bln = false;
            for(i=0; i<form.elements.length; i++)
            {
                var e = form.elements[i];
                if (e.type == "checkbox" && e.checked && e.name != "chkAll")
                {
                    bln = true;
                    break;
                }
             }
             
            if (bln)
            {
                if (confirm('确定要选定的客户加入到邮件群发吗?'))
                {
                    return true;
                }
                else
                {
                    for (var i=0;i<form.elements.length;i++)
                    {
                        var e = form.elements[i];
                        if (e.type == "checkbox")
                        e.checked = false;
                    }

                    return false;
                }
            }
            else
            {
                alert('请选择您要操作的客户');
                for (var i=0;i<form.elements.length;i++)
                {
                    var e = form.elements[i];
                    if (e.type == "checkbox")
                    e.checked = false;
                }

                return;
            }
        }
    </script>

</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
    <form id="form2" runat="server">
    <table width="96%" border="0" cellspacing="0" cellpadding="1" align="center">
        <tr>
            <td height="40" align="center" bgcolor="#F7F7F7" class="black14">
                <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
                     <tr>
                  <td height="40" width="33%" align="center" bgcolor="#E1EFFA" class="black14" runat="server" id="tdPanel1">
                        <ShoveWebUI:ShoveConfirmButton id="btnPanel1" runat="server" 
                            style="cursor: hand" BackColor="#E1EFFA" BorderStyle="None" Width="80px" 
                            Text="处理提款申请" Height="30px" onclick="btnPanel1_Click" />
                  </td>
                  <td align="center" width="34%" bgcolor="#F0F0F0" class="black14" runat="server" id="tdPanel2">
                        <ShoveWebUI:ShoveConfirmButton id="btnPanel2" runat="server" 
                            style="cursor: hand" BackColor="#F0F0F0" BorderStyle="None" Width="140px" 
                            Text="已处理提款在线发放" Height="30px" onclick="btnPanel2_Click" />
                  </td>
                  <td align="center" width="33%" bgcolor="#F0F0F0" class="black14" runat="server" id="tdPanel3">
                        <ShoveWebUI:ShoveConfirmButton id="btnPanel3" runat="server" 
                            style="cursor: hand" BackColor="#F0F0F0" BorderStyle="None" Width="80px" 
                            Text="已发记录" Height="30px" onclick="btnPanel3_Click" />
                  </td>
                </tr> 
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server">
                    <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
                        <tr>
                            <td height="40" align="center" class="black14">
                                <asp:DataGrid ID="g" runat="server" BackColor="#6CA4E4" CellPadding="5" Width="100%"
                                    CellSpacing="1" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False"
                                    AllowPaging="True" CssClass="gStyle" OnItemCommand="g_ItemCommand" OnItemDataBound="g_ItemDataBound">
                                    <FooterStyle HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
                                    <SelectedItemStyle HorizontalAlign="Center" Font-Bold="True" ForeColor="White"></SelectedItemStyle>
                                    <HeaderStyle HorizontalAlign="Center" ForeColor="Navy" VerticalAlign="Middle" CssClass="gHeader">
                                    </HeaderStyle>
                                    <ItemStyle CssClass="gItem" BackColor="White" />
                                    <Columns>
                                        <asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="id" DataNavigateUrlFormatString="../BalanceCenter/Score.aspx?id={0}"
                                            DataTextField="Name" HeaderText="消费ID"></asp:HyperLinkColumn>
                                        <asp:BoundColumn DataField="RealityName" HeaderText="真实姓名"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="IDCardNumber" HeaderText="身份证号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="BankNameDetail" HeaderText="开户行"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="BankCardNumber" HeaderText="银行卡号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Balance" HeaderText="帐户余额">
                                        <ItemStyle HorizontalAlign="Center" ForeColor="Red"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:BoundColumn HeaderText="提款金额">
                                        <ItemStyle HorizontalAlign="Center" ForeColor="Red"></ItemStyle>
                                        </asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="结算">
                                            <ItemTemplate>
                                                <asp:TextBox ID="tbMoney" runat="server" Width="60px" Enabled="false" MaxLength="10" Height="15px"></asp:TextBox>&nbsp;
                                                <ShoveWebUI:ShoveConfirmButton ID="btnGO" runat="server" Width="60px" BorderWidth="1px"
                                                    AlertText="确定立即结算吗？(银行转帐)" Text="立即结算" Height="20px" CommandName="btnGO"></ShoveWebUI:ShoveConfirmButton>
                                                <ShoveWebUI:ShoveConfirmButton ID="btnGOOnlinPay" runat="server" Width="60px" BorderWidth="1px"
                                                    AlertText="确定立即结算吗？(在线转账)" Text="在线转账" Height="20px" CommandName="btnGOOnlinPay">
                                                </ShoveWebUI:ShoveConfirmButton>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="isSurrogate"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Freeze"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="EarningBalanced"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Province"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="City"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Name"></asp:BoundColumn>
                                    </Columns>
                                    <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC">
                                    </PagerStyle>
                                </asp:DataGrid>
                                <ShoveWebUI:ShoveGridPager ID="gPager" BorderWidth="0" CssClass="gStyle" BorderStyle="None"
                                    runat="server" Width="100%" ShowSelectColumn="False" DataGrid="g" OnPageWillChange="gPager_PageWillChange"
                                    OnSortBefore="gPager_SortBefore" AlternatingRowColor="White" HotColor="White"
                                    GuiseColor="False" ClientNavigation="true" PageSize="10" />
                                <ShoveWebUI:ShoveConfirmButton ID="btnGOAll" runat="server" Width="112px" Text="全部结算到银行卡"
                                    AlertText="确信要将所有消费者的帐户余额全部结算吗（银行转账）？" OnClick="btnGOAll_Click"></ShoveWebUI:ShoveConfirmButton>
                                <ShoveWebUI:ShoveConfirmButton ID="btnGOAllOnlinPay" runat="server" AlertText="确信要将所有消费者的帐户余额全部结算吗（在线转账）？"
                                    OnClick="btnGOAllOnlinPay_Click" Text="全部结算到在线付款" Width="118px"></ShoveWebUI:ShoveConfirmButton>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="Panel2" runat="server" Visible="false">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                        <tr>
                            <td height="40" class="black14">
                                <asp:DataGrid ID="g1" runat="server" BackColor="#6CA4E4" CellPadding="5" Width="100%"
                                    CellSpacing="1" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False"
                                    AllowPaging="True" CssClass="gStyle" OnItemCommand="g1_ItemCommand" OnItemDataBound="g1_ItemDataBound">
                                    <FooterStyle HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
                                    <SelectedItemStyle HorizontalAlign="Center" Font-Bold="True" ForeColor="White"></SelectedItemStyle>
                                    <HeaderStyle HorizontalAlign="Center" ForeColor="Navy" VerticalAlign="Middle" CssClass="gHeader">
                                    </HeaderStyle>
                                    <ItemStyle CssClass="gItem" BackColor="White" />
                                    <Columns>
                                        <asp:TemplateColumn>
                                            <EditItemTemplate>
                                                <asp:Label ID="lbAddAlipay" runat="server"></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="cbAddAlipay" runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn DataField="ID" HeaderText="序号"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Name" HeaderText="用户名"></asp:BoundColumn>
                                        <asp:BoundColumn HeaderText="金额" DataField="Money"></asp:BoundColumn>
                                        <asp:BoundColumn HeaderText="时间" DataField="DateTime"></asp:BoundColumn>
                                        <asp:BoundColumn HeaderText="工资方式"></asp:BoundColumn>
                                        <asp:BoundColumn HeaderText="审核"></asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="发放方式">
                                            <ItemTemplate>
                                                <ShoveWebUI:ShoveConfirmButton ID="btnToBank" BorderStyle="Solid" BorderWidth="1px"
                                                    runat="server" Width="78" Height="22" Text="发到银行卡" CommandName="btnToBank" />
                                                <ShoveWebUI:ShoveConfirmButton ID="btnToAlipay" BorderStyle="Solid" BorderWidth="1px"
                                                    runat="server" Width="98" Height="22" Text="发到支付宝帐户" CommandName="btnToAlipay" />
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                            </EditItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn Visible="False" DataField="BankTypeName"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="BankNameDetail"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="BankCardNumber"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Province"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="City"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="RealityName"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="UserID"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="PaymentType"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Type"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="isPersonal"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Email"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Money"></asp:BoundColumn>
                                    </Columns>
                                    <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC">
                                    </PagerStyle>
                                </asp:DataGrid>
                                <ShoveWebUI:ShoveGridPager ID="gPager1" BorderWidth="0" CssClass="gStyle" BorderStyle="None"
                                    runat="server" Width="100%" ShowSelectColumn="False" DataGrid="g" OnPageWillChange="gPager1_PageWillChange"
                                    OnSortBefore="gPager_SortBefore" AlternatingRowColor="White" HotColor="White"
                                    GuiseColor="False" ClientNavigation="true" PageSize="10" />
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                全选 &nbsp;<input id="chkAll" onclick="javascript: CheckAll(this.form);" type="checkbox"
                                    value="checkbox" name="chkAll">
                                &nbsp;<br />
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <ShoveWebUI:ShoveConfirmButton ID="btnAlipayAdd" runat="server" Width="129px" Height="28px"
                                    BackgroupImage="../images/gz_botton_4.jpg" Text=" " AlertText="确信输入无误，并立即派发吗？"
                                    OnClick="btnAlipayAdd_Click" />
                                <ShoveWebUI:ShoveConfirmButton ID="btnAlipayToAlipayAdd" runat="server" Width="129px"
                                    Height="28px" BackgroupImage="../images/gz_botton_5.jpg" Text=" " AlertText="确信输入无误，并立即派发吗？"
                                    OnClick="btnAlipayToAlipayAdd_Click" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="Panel3" runat="server" Visible="false">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="right">
                                <input id="tbTime" name="tbTime" runat="server" onclick="WdatePicker()" />
                            </td>
                            <td width="150px">
                                &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" Width="60px" Text="查询" OnClick="btnSearch_Click">
                                </asp:Button>
                                <asp:Button ID="btnDownload" runat="server" OnClick="btnDownload_Click" Text="下载"
                                    Visible="False" Width="60px" />
                            </td>
                        </tr>
                    </table>
                    <asp:DataGrid ID="g2" runat="server" BackColor="#6CA4E4" CellPadding="5" Width="100%"
                        CellSpacing="1" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False"
                        AllowPaging="True" CssClass="gStyle" OnItemCommand="g2_ItemCommand" OnItemDataBound="g2_ItemDataBound">
                        <FooterStyle HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
                        <SelectedItemStyle HorizontalAlign="Center" Font-Bold="True" ForeColor="White"></SelectedItemStyle>
                        <HeaderStyle HorizontalAlign="Center" ForeColor="Navy" VerticalAlign="Middle" CssClass="gHeader">
                        </HeaderStyle>
                        <ItemStyle CssClass="gItem" BackColor="White" />
                        <Columns>
                            <asp:TemplateColumn>
                                <EditItemTemplate>
                                    <asp:Label ID="lbAddAlipay" runat="server"></asp:Label>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbAddAlipay" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn DataField="ID" HeaderText="序号"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Name" HeaderText="用户名"></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="金额" DataField="Money"></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="时间" DataField="DateTime"></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="工资方式"></asp:BoundColumn>
                            <asp:BoundColumn HeaderText="状态"></asp:BoundColumn>
                            <asp:TemplateColumn HeaderText="处理">
                                <ItemTemplate>
                                    <ShoveWebUI:ShoveConfirmButton ID="btnOK" BorderStyle="Solid" BorderWidth="1px" runat="server"
                                        Width="90" Height="22" Text="已线下转账" AlertText="确认已线下转帐吗？" CommandName="btnOK" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                </EditItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn Visible="False" DataField="BankTypeName"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="BankNameDetail"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="BankCardNumber"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="Province"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="City"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="RealityName"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="UserID"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="PaymentType"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="Type"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="Result"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="Money"></asp:BoundColumn>
                        </Columns>
                        <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC">
                        </PagerStyle>
                    </asp:DataGrid>
                    <ShoveWebUI:ShoveGridPager ID="gPager2" BorderWidth="0" CssClass="gStyle" BorderStyle="None"
                        runat="server" Width="100%" ShowSelectColumn="False" DataGrid="g" OnPageWillChange="gPager2_PageWillChange"
                        OnSortBefore="gPager_SortBefore" AlternatingRowColor="White" HotColor="White"
                        GuiseColor="False" ClientNavigation="true" PageSize="10" />
                </asp:Panel>
            </td>
        </tr>
    </table>
    </font>
    </form>
</body>
</html>
